#ifndef FILE_HANDLER_H
#define FILE_HANDLER_H

#include <iostream>
#include <vector>

class Handler
{
	private:
		int handler;
		char *filename;
		unsigned int size;
	
	public:
		Handler();
		Handler(const Handler &toCopy);
		virtual ~Handler();

		void set(int handler, const char *filename, unsigned int size);
		void get(int &handler, char *filename, unsigned int &size);

		const Handler &operator=(const Handler & toAssign);
		bool operator<(const Handler & right);
		bool operator==(const Handler & right);
};

class FileHandler
{
	private:
		std::vector<Handler> handlers;
		bool isModified;
	public:
		FileHandler();
		virtual ~FileHandler();

		void Create();
		void Open();

		int Add(const char* filename);
		void Remove(int handler);

		int Get(const char* filename);
		void Get(int handler, char* filename);

		void Close();
		void Destroy();
};


#endif

 
